package lesson2.example5;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

class AnnotationInvocationHandler implements InvocationHandler {
	private final Map<String, Object> memberValues = new HashMap<String, Object>();
	
	
	{
		memberValues.put("desc", "TestRuntimeAnnotation");
		memberValues.put("uri","lesson2.example5.TestRuntimeAnnotation");
	}

	public Object invoke(Object proxy, Method method, Object[] args) {

		String member = method.getName();
		
		Object result = memberValues.get(member);
		
		return result;
	}
}
